import pytest

import pytest
#allure serve allure-resultsif name == '__main__':如果直接运⾏该⽂件，则执⾏以下操作。
# pytest.main(["-v", "--alluredir=./allure-results", "./"])

pytest.main(['-vs','test_calc.py::TestCalc::test_add02','--alluredir=./allure-results'])
# pytest.main(['-vs',r'D:\HongRuan-Work\Python\PythonProject\0704'])
# pytest.main(['-vs','test_calc.py::TestCalc::test_add02'])
# pytest.main(['-vs','test_calc.py','--html=./加法测试报告.html'])
# pytest.main(['-vs','test_calc.py','--alluredir=./json_report']) # 生成json格式的测试报告
# os.system('allure generate ./json_report -o ./html_report')